package cn.study.zgm.nettyall.channel;

import java.nio.ByteBuffer;

/**
 * packageName cn.study.zgm.nettyall.channel
 *
 * @author 你的名字
 * @version JDK 8
 * @className TestByteBufferAllocate (此处以class为例)
 * @date 2025/2/23
 * @description TODO
 */
public class TestByteBufferAllocate {
    public static void main(String[] args) {
        final ByteBuffer allocate = ByteBuffer.allocate(10); // --java堆内存
        final ByteBuffer allocateDirect = ByteBuffer.allocateDirect(16);
        System.out.println("allocate："+allocate.getClass());
        System.out.println("allocateDirect："+allocateDirect.getClass());
    }
}
